package edu.lingnan.librarymanage.repository;

import edu.lingnan.librarymanage.core.bean.Borrow;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author cql
 */
@Repository
public interface BorrowRepository extends JpaRepository<Borrow, Integer> {


    /**
     * 根据用户ID查询用户借阅记录
     *
     * @param userId
     * @return
     */
    List<Borrow> findByUserId(Integer userId);
}
